Determination of borehole shape using standoff measurements

ABSTRACT

A method includes positioning a downhole tool in a borehole formed in a subsurface formation, wherein the downhole tool comprises a plurality of calipers arranged around a circumference of the downhole tool. The method includes detecting, using the plurality of calipers, a plurality of standoff measurements at different rotation angles and determining a plurality of apparent diameters of the borehole for the different rotation angles of the downhole tool based on the plurality of standoff measurements and at least one of a radius and a diameter of the downhole tool. The method includes determining a probability function based on the plurality of apparent diameters and determining a shape of the borehole based on the probability function.

TECHNICAL FIELD

The disclosure generally relates to the field of drilling, and moreparticularly, to determining shape of a borehole drilled in a subsurfaceformation using standoff measurements.

BACKGROUND

A borehole is drilled in a geological formation to facilitate productionof hydrocarbons. The borehole shape is preferentially circular, but itcan take various shapes depending on a nature of the geologicalformation and drilling dynamics.

The shape of the borehole can be determined in many ways. A first methodinvolves mechanical measurement by a tool with mechanical calipersarranged around a circumference of the tool. The tool is inserted intothe borehole via a wireline which does not allow the tool to rotate. Themechanical calipers are spread out to physically touch a borehole wallof the borehole. The amount that each of the mechanical calipers arespread out at different rotational angles of the tool is indicative ofthe shape of the borehole. A second method involves a non-contactmeasurement. A logging while drilling (LWD) tool having an ultrasoniccaliper is inserted into the borehole. The ultrasonic caliper transmitsultrasonic waves and receives reflections from the borehole wall atdifferent rotational angles of the tool. The shape of the borehole canbe determined based on a diameter of the tool and a travel time of theultrasonic waves from the tool to a wall of the borehole and back to thetool.

The shape of the borehole is critical for well completions, such asplanning cement volumes needed in a cementing operation. The shape ofthe borehole is also indicative of actual or predicted breakout orborehole stresses, e.g., failure of the rock in the borehole. In thisregard, accurate determination of the shape of the borehole with lowcomplexity facilitates efficient extraction of hydrocarbons.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments of the disclosure may be better understood by referencingthe accompanying drawings.

FIG. 1 illustrates a borehole shape system for determining a shape of aborehole in a formation.

FIG. 2 illustrates example measurements associated with determining theshape of the borehole.

FIG. 3 shows an example of a simulated probability density function.

FIG. 4 is a flow chart of functions associated with determining theshape of the borehole based on a probability density function.

FIG. 5 shows an example of an experimental probability density function.

FIG. 6 shows an example of a modeled cumulative distribution function.

FIG. 7 is a flow chart of functions associated with determining theshape of the borehole based on the modeled cumulative distributionfunction.

FIG. 8 shows an example of an experimental cumulative distributionfunction.

FIG. 9 is schematic diagram of well apparatus.

FIG. 10 is another schematic diagram of well apparatus.

FIG. 11 is a block diagram of apparatus for determining a shape of aborehole drilled in a formation.

DESCRIPTION OF EMBODIMENTS

The description that follows includes example systems, methods,techniques, and program flows that embody embodiments of the disclosure.However, it is understood that this disclosure may be practiced withoutthese specific details. For instance, this disclosure refers todetermining a shape of a borehole drilled in a formation in illustrativeexamples. Embodiments of this disclosure can be also applied todetermining a shape of a hole in other contexts. Further, well-knowninstruction instances, protocols, structures and techniques have notbeen shown in detail in order not to obfuscate the description.

Overview

A tool used in non-contact determination of the shape of the boreholetypically has two ultrasonic calipers located diagonally across fromeach other. Each ultrasonic caliper is used to calculate a standoff. Thestandoff is a travel distance of ultrasonic waves from the caliper to awall of the borehole and back. The shape of the borehole is typicallycharacterized by an apparent diameter. The apparent diameter is adiameter of the borehole for a given angular position of the tool in theborehole. The apparent diameter is determined by summing the standoffsassociated with these two ultrasonic calipers and a diameter of the toolfor the given angular position.

The tool with ultrasonic calipers can be arranged to rotate within theborehole. In this regard, a plurality of apparent diameters of theborehole may be calculated for various angular positions of the tool. Acurve fitting such as least squares (LS) fitting is used to fit theapparent diameters at the various angular positions to a circle orellipse to estimate a shape of the borehole.

LS fitting requires a complex multi-variate optimization process todetermine the shape of the borehole. Further, the tool needs to beuniformly rotated in the borehole in order to collect neededmeasurements to perform the LS fitting. Still further, a boreholedirection needs to be the same in a certain depth interval in orderaccurately determine the shape of the borehole.

Embodiments described herein are directed to determining a shape of aborehole based on a probability function. The probability function isindicative of a semimajor and semiminor axis of an ellipserepresentative of the shape of the borehole. The determination of aprobability function to determine shape of the borehole has a lowercomplexity than determining shape based on the LS fitting.

In one or more examples, the probability function is a probabilitydensity function which specifies a probability of an apparent diametertaking a certain value. A tool is inserted into a borehole to determinea plurality of apparent diameters. The plurality of apparent diameter isanalyzed to form a probability density function, referred to as anexperimental probability density function. The experimental probabilitydensity function indicates a semimajor and semiminor axes of theborehole. The semimajor axis of the borehole is a maximum apparentdiameter in the experimental probability density function. The semiminoraxis of the ellipse is an apparent diameter in the experimentalprobability density function with maximum probability.

In other examples, the probability function is a cumulative densityfunction which specifies a probability of an apparent diameter of theplurality of apparent diameters taking a certain value or less. Theplurality of apparent diameters determined by a downhole tool insertedinto a borehole of a formation are analyzed to form a cumulative densityfunction, referred to as an experimental cumulative density function. Acurve fitting such as a nonlinear least squares inversion is used tobest fit a modeled cumulative density function to the experimentalcumulative density function. Parameters of the modeled cumulativedensity function which achieve the best fit indicate the semimajor andsemiminor axis of the borehole.

The description that follows includes example systems, apparatuses, andmethods that embody aspects of the disclosure. However, it is understoodthat this disclosure may be practiced without these specific details. Inother instances, well-known instruction instances, structures andtechniques have not been shown in detail in order not to obfuscate thedescription.

Example Illustrations

FIG. 1 illustrates a well site system 100 in which various embodimentscan be employed. The system 100 can be onshore or offshore. In thisexample system, a borehole 102 is formed in a geological formation 104by rotary drilling in a manner that is well known. The system 100includes a downhole tool 106 and a computer system 108.

The downhole tool 106 may be a structure positioned within the borehole102. In one or more examples, the structure may be cylindrical in shape.The downhole tool 106 may be mounted on a drill string behind a drillbit in the formation 104 or to a wireline (or other conveyance) which isinserted into the borehole 102. The downhole tool 106 may be sized andconfigured to rotate and/or move in the borehole 102 as a result of therotation of the drill bit or rotation of the wireline.

The downhole tool 106 may have one or more acoustic sensors in the formof conventional ultrasonic calipers 110 arranged around a circumferenceof the downhole tool 106. The ultrasonic calipers (transducers) 110 maytransmit a high frequency signal such as a pulse and collect echoes ofthe high frequency signal reflected off a wall of the borehole 102. Theultrasonic calipers 110 may transmit and receive ultrasonic signals butthe signals could take other forms including transmitting and receivingsignals at frequencies other than ultrasonic frequencies. The downholetool 106 is shown to have four ultrasonic calipers 110 separated by 90degrees. The downhole tool 106 may have more or less ultrasonic calipers110, but in one or more embodiments, the downhole tool 106 may have noless than two ultrasonic calipers 110. Additionally, the ultrasoniccalipers 110 may be evenly spaced around the downhole tool 106 such thatthe ultrasonic calipers 110 are arranged to be diagonally across fromeach other on the downhole tool 106.

Computer system 108 may facilitate determination of a shape of theborehole 102. The shape may be a cross sectional representation of theborehole 102. The computer system 108 may be located on a surface of theformation 104 (as shown) or downhole in which case the computer system108 may be rugged to withstand temperatures and pressures downhole. Thecomputer system 108 may have a communication interface 112 whichfacilitates wired or wireless communication between the computer system108 and the downhole tool 106 via a communication path 116. The computersystem 108 may also have a borehole shape system 114 to facilitate thedetermination of the shape of the borehole 102.

A time of flight may be calculated between when an ultrasonic signal istransmitted and when it is received by a respective ultrasonic caliper110. This time of flight is indicative of a standoff of the downholetool 106 for a given rotational angle of the tool 106. Each ultrasoniccaliper may send and receive signals at different frequencies, atdifferent rotational angles of the downhole tool 106, and/or atdifferent time intervals so that different measures of standoff can beperformed in parallel. The borehole shape system 114 may have anapparent diameter engine 118 and probability engine 120 to process thestandoffs to determine a shape of the borehole 102. The apparentdiameter engine 118 may determine a plurality of apparent diameters ofthe borehole based on the standoffs. The apparent diameter may describea diameter of the borehole at a given rotational angle of the downholetool 106 in the borehole. The borehole shape system 114 may determine aplurality of apparent diameters for the borehole 102 for variousrotational angles of the downhole tool 106. The probability engine 120may determine from the apparent diameters a probability functionindicative of the shape of the borehole as described in further detailbelow.

FIG. 2. illustrates example measurements associated with determining ashape, e.g., cross section, of a borehole 102, by the borehole shapesystem. The borehole shape system may identify the shape of the borehole102 in terms of one or more of a semimajor axis a, semiminor axis b, andellipticity. In this regard, the borehole shape system assumes the shapeof the borehole 102 is a borehole ellipse and outputs a size of theborehole 102.

A downhole tool 106 may be positioned somewhere within the borehole 102.The downhole tool 106 may perform measurements in the borehole 102. Thedownhole tool 106 may vary in position in the borehole 102 as theborehole is drilled, but constrained to remain within walls of theborehole 102. The downhole tool 106 is shown in the borehole ellipse aseccentric from a centroid of the ellipse. A center 202 of the downholetool 106 may be designated as (x₀, y₀). The downhole tool 106 may alsohave at least two ultrasonic calipers 110 located at (1, −1). In one ormore examples, pairs of the ultrasonic calipers 110 may be directlyacross from each other on a body of the downhole tool 106.

The apparent diameter d determined by the apparent diameter engine maybe based on a standoff (S₁, S₂) of each ultrasonic caliper and a radiusr₀ of the downhole tool 106. The standoff is a distance from theultrasonic caliper to a wall of the borehole 102. The standoff iscomputed based on the indication of a travel time between when anultrasonic signal is sent out, bounces off a wall of the borehole 102,and is received by the ultrasonic caliper 110. The standoff iscalculated as:

standoff=V _(borehole)·(t _(twoway))/2

where V_(borehole) is sound velocity in the borehole 102 and t_(twoway)is the travel time. The sound velocity in the borehole 102 may be basedon materials in the borehole 102 which has a given sound velocity. Thematerials downhole in the subsurface formation may take the form of mudand mud velocity can be obtained precisely in situ if a mud cell isinstalled with the downhole tool. The mud cell may have an ultrasoniccaliper which sends an ultrasonic signal and receives the ultrasonicsignals to a fixed target through the mud. Based on a distance of thefixed target and time to send and receive the ultrasonic signal, thesound velocity can be determined. Alternatively, V_(borehole) can becalculated based on sending ultrasonic signals to a casing section andreceiving ultrasonic signals that bounce off the casing section. Thecasing may have a known geometry. Based on the known geometry and timeto send and receive the ultrasonic signal, the sound velocity can bedetermined. The apparent diameter may be then calculated as:

d=s1+s2+2r ₀  (1)

The apparent diameter d for an angle of rotation Θ of the tool is shownas solid line 200. The apparent diameter d may vary as the ultrasonictool moves and rotates within the borehole. In this regard, a pluralityof apparent diameters may be calculated for the borehole 102 for aplurality of rotational angles and positions of the downhole tool 106 inthe borehole 102 and stored in memory by the apparent diameter engine.

Other mechanisms for determining the apparent diameter may also be used.For example, the downhole tool may have an imaging device for imagingthe borehole. The image may be analyzed through image processingtechniques to determine the apparent diameter of the borehole. Theexamples described herein are not limited by the mechanism used todetermine the apparent diameter of the borehole.

The apparent diameter may be expressed as a line. The line may take theform of:

y=m(x−x ₀)+y ₀  (2)

where (x₀, y₀) is the origin of the downhole tool 106, (x,y) is aposition along a wall of the borehole 102, θ is an angle of rotation ofthe downhole tool 106, and m=tan (θ). The shape of the borehole 102 maybe expressed as an ellipse by the following equation:

$\begin{matrix}{{\frac{x^{2}}{a^{2}} + \frac{y^{2}}{b^{2}}} = 1} & (3)\end{matrix}$

The apparent diameter may be calculated as:

$\begin{matrix}{{d\left( {x_{0},y_{0},\theta} \right)} = {\frac{\sqrt{B^{2} - {4AC}}}{A} \cdot \sqrt{1 + {\tan^{2}\theta}}}} & (4)\end{matrix}$ $\begin{matrix}\left\{ \begin{matrix}{A = {\frac{b^{2}}{a^{2}} + {\tan^{2}\theta}}} \\{B = {2\tan{\theta\left( {y_{0} - {x_{0}\tan\theta}} \right)}}} \\{C = \ {\left( {y_{0} - {x_{0}\tan\theta}} \right)^{2} - b^{2}}}\end{matrix} \right. & (5)\end{matrix}$

The equation for apparent diameter has five unknowns which requires atleast five measurements of apparent diameter to solve for the unknowns,including the semimajor and semiminor axes. Solving for the fiveunknowns is a computationally complex multivariate problem. To simplifythe determination of the unknowns, the probability engine may determinethe semimajor axis a and semiminor axis b of the ellipse based on aprobability function associated with the apparent diameters rather thanexplicitly solving for the semimajor axis a and semiminor axis b.Substantial processing time may be saved by determining the semimajorand semiminor axes in this manner.

In one or more embodiments, the probability function may take the formof a probability density function (PDF) p(d) for determining thesemimajor and semiminor axes. The PDF may be derived from a cumulativedistribution function (CDF) of probability P (d) of the apparentdiameter d. The CDF may be represented as:

$\begin{matrix}{{P(d)} = {\frac{1}{c}{\int{\int{\int_{{c({x_{0},y_{0},\theta})} < d}{{dx}_{0}{dy}_{0}d\theta}}}}}} & (6)\end{matrix}$

where c is a normalization factor such that a maximum value of the CDFis one and x₀, y₀, and θ are independent variables with uniformdistribution. The CDF may be integrated based on a constraint that aposition of the downhole tool remains within the borehole 102. With theborehole 102 being an ellipse, this constraint is reflected in theintegration as:

$\begin{matrix}\left\{ \begin{matrix}{{\frac{x_{0}^{2}}{a^{2}} + \frac{y_{0}^{2}}{b^{2}}} \leq 1} \\{{{\min\limits_{{\frac{x^{2}}{a^{2}} + \frac{y^{2}}{b^{2}}} = 1}\left( {x - x_{0}} \right)}^{2} + \left( {y - y_{0}} \right)^{2}} \geq {r_{0}2}}\end{matrix} \right. & \begin{matrix}(7.1) \\(7.2)\end{matrix}\end{matrix}$

where equation 7.1 constrains a center (x₀, y₀) of the tool 106 to belocated within the borehole 102 and equation 7.2 constrains the radiusr₀ of the tool 106 to be within the borehole 102.

The probability density function (PDF) p(d) can be written as:

p(d)=P′(d)  (8)

FIG. 3 shows example probability density functions as a result ofsimulating rotation of a downhole tool (e.g., 106 in FIGS. 1-2) inboreholes of different sizes based on a downhole tool with 16transducers with a tool radius of 0.5. The probability density functionsare calculated based on equations 6 to 8. First histogram 300 is basedon e=0.6 (the length of minor axis is simulated as 2.4 and major axis issimulated as 4); second histogram 310 is based on e=0.8 (the length ofminor axis is simulated as 3.2 and major axis is simulated as 4); andthird histogram 310 is based on e=1.0 (the length of minor axis issimulated as 4 and major axis is simulated as 4).

Based on observations of FIG. 3, peaks of PDF p(d) coincide with theminor axis length in the respective cases and the major axis is theupper bound of d in the PDF p(d). Further, based on additionalsimulations (not shown here) such coincidence is independent of the toolsize and the number of calipers. Hence, based on these observations, thesemimajor a and semiminor axis b of a borehole can be determined as:

$\begin{matrix}\left\{ \begin{matrix}{a = {\max\left( \frac{d}{2} \right)}} \\{b = \frac{\arg\left( {\max\left( {p(d)} \right)} \right)}{2}}\end{matrix} \right. & (9)\end{matrix}$

where max( ) is a function that finds a maximum of variable provided tothe function and arg( ) is a function that identifies an argument intothe function that produces a value. To illustrate, max (d/2) finds themaximum apparent diameter of the probability density function which isindicative of the semimajor axis and arg ( ) identifies the apparentdiameter which has the maximum probability of the probability densityfunction which is indicative of the semiminor axis.

FIG. 4 is a flow chart of functions associated with determining theshape of the borehole in a geological formation based the observedrelationship between a probability density function of the apparentdiameters and the semiminor and semimajor axes of the borehole.

At 402, a plurality of apparent diameters for a borehole may bedetermined for a plurality of rotation angles of a downhole tool placedin a borehole. For example, a downhole tool (e.g., 106 in FIGS. 1-2) mayrotate in the borehole, the ultrasonic calipers may transmit and receiveultrasonic signals, and standoffs may be calculated which are combinedwith a radius of the downhole tool to determine the apparent diameters.At 404, a probability density function of the apparent diameters isformed based on the determined apparent diameters. This probabilitydensity function may be referred to as an experimental probabilitydensity function.

FIG. 5 is an example of the experimental probability density function500. The experimental probability density function 500 may have an axis502 which represents a range of apparent diameters. The axis 502 may besubdivided into non-overlapping subranges where each subrange is a bin504. An axis 506 may indicate how many apparent diameters of thedetermined plurality of apparent diameters falls within a subrange ofthe apparent diameters. For example, a counter associated with a bin maybe incremented by one each time an apparent diameter falls in thesubrange of apparent diameters associated with the bin. This process isrepeated for the plurality of apparent diameters determined at 402. Inone or more examples, counts associated with each bin may then benormalized across all bins to define the probability density function500 of the apparent diameters.

At 406, an apparent diameter associated with the peak of the probabilitydensity function (shown in FIG. 5 as 508) may be determined which isindicative of the semiminor axis of the borehole. At 408, the maximumapparent diameter of the probability density function with non-zeroprobability (shown in FIG. 5 as 510) may be determined which isindicative of the semimajor axis of the borehole. At 410, a shape of theborehole may be output in terms of the determined semimajor andsemiminor axis.

The computation of p(d) relies on collecting a large number of apparentdiameters for a plurality of rotation angles and positions of thedownhole tool in the borehole. Additionally, the computation of p(d)depends on a choice of bin sizes for binning the apparent diameters.Choosing a bin size with a smaller or larger subrange of apparentdiameters affect a shape and peak of the probability density functionand the shape of the borehole ellipse that is determined.

In one or more embodiments, a CDF represented as P(d) may be itself usedto determine the shape of the borehole ellipse which unlike theprobability density function p(d) is not impacted by a bin size. The CDFmay indicate a probability that an apparent diameter of a borehole isless than or equal to a given value. In some cases, a solution of theintegral in Eq. 6 above may be represented a function ƒ(d|e,r₀), wherewe define

$e = \frac{b}{a}$

as ellipticity and ƒ is dependent on e and r₀ to reduce a number ofvariables from three to two in the CDF. In some cases, a range ofvariable d and parameter r₀ may also be normalized so that d ranges from[0, 2] and r₀ ranges from (0,1] for ƒ(d|e,r₀). Therefore, the relationbetween P(d) and ƒ(d|e,r₀) can be written as:

$\begin{matrix}{{P_{a,b,r_{0}}(d)} = {f\left( {\left. \frac{d}{a} \middle| e \right.,\frac{r_{0}}{a}} \right)}} & (10)\end{matrix}$

FIG. 6 shows an illustration of ƒ(d|e,r₀) for fixed r₀ versus apparentdiameter d and ellipticity e for tool radius r₀ 0.25 and a semimajoraxis of 1. The function f(d|e,r₀) may be referred to as a modeled CDF. Ashape of the modeled CDF may be based on one or more of the semimajoraxis of a borehole, semiminor axis of a borehole, and ellipticity of aborehole.

The modeled CDF represented by equations 6 and 7 may be curve fit to anexperimental CDF to determine the semimajor and semiminor axes of theborehole associated with the experimental CDF. The experimental CDF maybe a CDF determined by inserting a downhole tool into a formation,determining a plurality of apparent diameters, and using the pluralityof apparent diameters to calculate a CDF. A non-linear least squaresinversion may be used to curve fit the experimental CDF to the modeledCDF. To facilitate the application of the non-linear least squaresinversion,

$a^{\prime} = \frac{1}{a}$

may be defined for simplification, and the Jacobian J of P_(a,b,r) ₀ (d)can be defined as follows:

$\begin{matrix}\left\{ \begin{matrix}{J_{a^{\prime}j} = {\frac{\partial}{\partial a^{\prime}}{P_{a,b,r_{0}}(d)}}} \\{J_{ej} = {\frac{\partial}{\partial e}{P_{a,b,r_{0}}(d)}}}\end{matrix} \right. & (11)\end{matrix}$

In one or more examples, the Jacobian may take the form of:

$\begin{matrix}\left\{ \begin{matrix}{J_{aj} = {{\frac{\partial}{\partial a^{\prime}}{P_{a,b,r_{0}}(d)}} = {{d{\frac{\partial}{\partial d^{\prime}}{f\left( {\left. d^{\prime} \middle| e \right.,{a^{\prime}r_{0}}} \right)}}} + {r_{0}{\frac{\partial}{\partial r_{0}^{\prime}}f}\left( {\left. {a^{\prime}d} \middle| e \right.,r_{0}^{\prime}} \right)}}}} \\{J_{ej} = {{\frac{\partial}{\partial e}{P_{a,b,r_{0}}(d)}} = {\frac{\partial}{\partial e}{f\left( {\left. \frac{d}{a} \middle| e \right.,\frac{r_{0}}{a}} \right)}}}}\end{matrix} \right. & (12)\end{matrix}$

The Jacobians relate a change in the modeled CDF to a change in theparameters indicative of the shape of the borehole which in this case isthe semimajor axis and the ellipticity since the modeled CDF is afunction of these parameters. The standard iterative nonlinear leastsquares inversion becomes:

$\begin{matrix}{\begin{pmatrix}a_{l}^{\prime} \\e_{l}\end{pmatrix} = {\left( {J \cdot J^{T}} \right)^{- 1}J\Delta y_{l}}} & (13)\end{matrix}$

where Δy_(l)=ƒ_(exp)(d)−ƒ(a_(l)′·d|e_(l),a_(l)′r₀). Δy_(l) is the misfitbetween the experimental CDF ƒ_(exp)(d) and the modelled CDFƒ(a_(l)′·d|e_(l),a_(l)′r₀), where l denotes the number of iterations,i.e., a_(l)′ is l-th iterative value of a′. Optimal (a_(l)′ e_(l))′ isthen iteratively solved, each iteration improving the estimate of theshape of the borehole until the misfit reaches a desired thresholdlevel. In this regard, the standard iterative nonlinear least squaresapproach best fits the modeled CDF to the experimental CDF and theparameters of the modeled CDF, including a and e are indicative of theshape of the borehole.

A total number of measurements n by each caliper may be given by thefollowing relation:

$\begin{matrix}{n_{min} \leq \frac{D \cdot R_{f} \cdot {rpm} \cdot N}{2 \cdot V_{DS}}} & (14)\end{matrix}$

where n_(min) is the minimal required total number of measurements, D isa spatial resolution (e.g., depth) over which the measurements isperformed, R_(f) is a firing rate of the caliper (measurements perrevolution of the downhole tool), rpm is revolutions per minute that thedownhole tool is spinning, N is a number of calipers on the downholetool, and Vas is a drilling speed (e.g., ft/min). A minimal number ofmeasurements n_(min) may be a design parameter which is chosen so that astandard deviation of the experimental CDFs across different tool radiusand ellipticity is within a desired range such as 0.1. Based on thisminimal number of measurements n_(min) a minimal caliper firing rate isdetermined by solving for R_(f) in equation 13 to result in equation 14:

$\begin{matrix}{R_{f} \geq \frac{2 \cdot V_{DS} \cdot n_{min}}{D \cdot {rpm} \cdot N}} & (15)\end{matrix}$

FIG. 7 is another flow chart of functions associated with determiningthe shape of the borehole based a probability density function of theapparent diameters. At 702, a plurality of apparent diameters for aborehole may be determined for a plurality of rotation angles of adownhole tool (e.g., 106 in FIGS. 1-2) placed in a borehole. Forexample, the downhole tool may rotate in the borehole, the ultrasoniccalipers may transmit and receive ultrasonic signals, and standoffs maybe calculated which are combined with a radius of the downhole tool todetermine the apparent diameter. At 704, an experimental CDF may bedetermined based on the apparent diameters.

FIG. 8 is an example of this experimental CDF 800. The experimental CDF800 may show on an axis 802 a range of apparent diameters and on an axis804 a probability. The apparent diameters of axis 802 may span from 0 to5 ft and the probability may span from 0 to 1. The experimental CDF 800may indicate a probability that an apparent diameter of the borehole isless than or equal to a given size. To illustrate, an apparent diameterof 3 may be associated with a probability of 0.75 on the experimentalCDF which means that the borehole may have an 0.75 probability that theapparent diameter of the borehole is less than or equal to 3 ft.

At 706, the modeled CDF may be curve fit to the experimental CDF. Themodeled CDF may indicate a shape of a CDF of apparent diameters of aborehole as a function of parameters indicative of one or more of asemimajor axis, semiminor axis, and ellipticity of the borehole. Theparameters of the modeled CDF may be iteratively adjusted and themodeled CDF compared to the experimental CDF until a difference is lessthan a threshold amount. The parameters of the modeled CDF withdifference less than the threshold amount are indicative of one or moreof a semimajor axis, semiminor axis, and ellipticity of the borehole.The curve fit may take a variety of forms including a nonlinear leastsquares inversion process. At 708, an indication of the semimajor andsemiminor axis may be output based on the curve fit.

In the examples described above, the modeled CDF may be function of thesemimajor axis and ellipticity. The modeled CDF may be a function ofother indictors of the shape of the borehole including the semimajor ormajor axis and semiminor or minor axis. The equations are not generallylimited to the inputs and outputs described above. For example, thecurve fitting may indicate a shape of a borehole in terms other than thesemimajor axis and ellipticity. Further, in the examples describedabove, an apparent diameter is determined based off the standoffmeasurements which is used to calculate the shape of the borehole. Aradius may be used instead of the apparent diameter to calculate theshape of the borehole with adjustments to account for the fact that theradius is one-half of the apparent diameter.

FIG. 9 is a schematic diagram of an apparatus 900 that can be used toperform some of the operations and functions described with reference toFIGS. 1-8. The apparatus 900 includes a downhole tool 106 disposed on adrill string 902 of a depicted well apparatus 900. While borehole 102 isshown extending generally vertically into the subterranean formation904, the principles described herein are also applicable to boreholesthat extend at an angle through the subterranean formation 904, such ashorizontal and slanted boreholes. For example, although FIG. 9 shows avertical or low inclination angle well, high inclination angle orhorizontal placement of the well and equipment is also possible. Itshould further be noted that while FIG. 9 generally depicts a land-basedoperation, those skilled in the art will readily recognize that theprinciples described herein are equally applicable to subsea operationsthat employ floating or sea-based platforms and rigs, without departingfrom the scope of the disclosure.

The apparatus further includes a drilling platform 906 that supports aderrick 908 having a traveling block 910 for raising and lowering drillstring 902. Drill string 902 may include, but is not limited to, drillpipe and coiled tubing, as generally known to those skilled in the art.A kelly 912 may support drill string 902 as it may be lowered through arotary table 914. A drill bit 920 may be attached to the distal end ofdrill string 902 and may be driven either by a downhole motor and/or viarotation of drill string 902 from the surface 918. Without limitation,drill bit 920 may include, roller cone bits, PDC bits, natural diamondbits, any hole openers, reamers, coring bits, and the like. As drill bit920 rotates, it may create and extend borehole 102 that penetratesvarious subterranean formations such as 904. A pump 922 may circulatedrilling fluid through a feed pipe 924 to kelly 912, downhole throughinterior of drill string 902, through orifices in drill bit 920, back tosurface 918 via annulus 922 surrounding drill string 902, and into aretention pit 926.

Drill bit 920 may be just one piece of a downhole assembly that mayinclude one or more drill collars 928 and the downhole tool 106. One ormore of drill collars 926 may form a tool body 928, which may beelongated as shown on FIG. 9. Downhole tool 106 may be any suitablematerial, including without limitation titanium, stainless steel,alloys, plastic, combinations thereof, and the like. Downhole tool 106may further include one or more sensors 930.

The sensors 930 may include two or more acoustic calipers, e.g.,ultrasonic calipers, to determine apparent diameter of the borehole 102.Any suitable technique may be used for transmitting signals, e.g., anindication of output by the downhole tool 106 to a computer system 932residing on the surface 918. As illustrated, a communication link 934(which may be wired or wireless, for example) may be provided that maytransmit data from downhole tool 106 to the computer system 932 at thesurface 918. Communication link 934 may implement one or more of variousknown drilling telemetry techniques such as mud-pulse, acoustic,electromagnetic, etc. Computer system 932 may include a processing unit936, a monitor 938, an input device 940 (e.g., keyboard, mouse, etc.),and/or machine readable media 942 (e.g., optical disks, magnetic disks)that can store code representative of the methods described herein.Computer system 932 may act as a data acquisition system and possibly adata processing system that analyzes information from downhole tool 106.For example, computer system 932 may process the information fromdownhole tool 106 for determining a shape of the borehole based on theapparent diameters and probability functions as described herein. Thisprocessing may occur at the surface 918 in real-time. Alternatively, theprocessing may occur at surface 918 or another location after withdrawalof downhole tool 106 from borehole 102. Still alternatively, theprocessing may be performed downhole in the subterranean formation 904by the downhole tool 106.

Referring now to FIG. 10, a schematic diagram 1000 is shown of downholetool 106 on a wireline 1050. As illustrated, a borehole 102 may extendthrough subterranean formation 1002. Downhole tool 106 may be similar inconfiguration and operation to downhole tool 106 shown on FIG. 9 exceptthat FIG. 10 shows downhole tool 106 disposed on a conveyance, e.g.,wireline 1050 as shown. It should be noted that while FIG. 10 generallydepicts a land-based drilling system, those skilled in the art willreadily recognize that the principles described herein are equallyapplicable to subsea drilling operations that employ floating orsea-based platforms and rigs, without departing from the scope of thedisclosure.

As illustrated, a hoist 1004 may be used to run downhole tool 106 intoborehole 102. Hoist 1004 may be disposed on a recovery vehicle 1006.Hoist 1004 may be used, for example, to raise and lower wireline 1050 inborehole 102. While hoist 1004 is shown on recovery vehicle 1006, itshould be understood that wireline 1050 may alternatively be disposedfrom a hoist 1004 that is installed at the surface 1008 instead of beinglocated on recovery vehicle 1006. Downhole tool 106 may be suspended inborehole 102 on wireline 1050. Other conveyance types may be used forconveying downhole tool 106 into borehole 102, including coiled tubing,wired drill pipe, slickline, and downhole tractor, for example. Downholetool 106 may comprise a tool body, which may be elongated as shown onFIG. 10. Tool body may be any suitable material, including withoutlimitation titanium, stainless steel, alloys, plastic, combinationsthereof, and the like. Downhole tool 106 may further include ultrasoniccalipers for measuring an apparent diameter of the borehole.

As previously described, information from downhole tool 106 may betransmitted to computer system 932, which may be located at surface1008. As illustrated, communication link 934 (which may be wired orwireless, for example) may be provided that may transmit data, fromdownhole tool 106 to a computer system 932 at surface 1008. Computersystem 932 may include a processing unit 936, a monitor 938, and aninput device 940 (e.g., keyboard, mouse, etc.), and/or machine readablemedia 942 (e.g., optical disks, magnetic disks) that can store coderepresentative of the methods described herein for determining a shapeof the borehole based on the apparent diameters and probabilityfunctions as described herein. In addition to, or in place of processingat surface 1008, processing may occur downhole by the downhole tool 106.

FIG. 11 is a block diagram of apparatus 1100 (e.g., computer system 932)for determining a shape of a borehole drilled in a formation. Theapparatus 1100 may be located on the surface and/or downhole as part ofthe downhole tool or other system.

The apparatus 1100 includes a processor 1102 (possibly includingmultiple processors, multiple cores, multiple nodes, and/or implementingmulti-threading, etc.). The apparatus 1100 includes memory 1104. Thememory 1104 may be system memory (e.g., one or more of cache, SRAM,DRAM, zero capacitor RAM, Twin Transistor RAM, eDRAM, EDO RAM, DDR RAM,EEPROM, NRAM, RRAM, SONOS, PRAM, etc.) or any one or more other possiblerealizations of non-transitory machine-readable media for storingcomputer instructions, program code, and/or software executable by theprocessor 1102.

The apparatus 1100 may also include a persistent data storage 1106. Thepersistent data storage 1106 can be a hard disk drive, such as magneticstorage device. The computer device also includes a bus 1108 (e.g., PCI,ISA, PCI-Express, etc.) and a network interface 1110 in communicationwith the downhole tool. The apparatus 1100 may have a borehole shapesystem 1112 to determine a shape of a borehole based on measurement ofapparent diameters using the downhole tool and probability functions asdescribed above. The borehole shape system 1112 includes an apparentdiameter engine 1116 for determining apparent diameter of a borehole andprobability function engine 1114 for determining various probabilityfunctions associated with determining a borehole shape.

Further, the apparatus 1100 may further comprise a display 1118. Thedisplay 1118 may comprise a computer screen or other visual device. Thedisplay 1118 may show feedback including a graphical illustration of ashape of the borehole in the formation with semimajor and semiminoraxis.

The apparatus 1100 may implement any one of the previously describedfunctionalities partially (or entirely) in hardware and/or software(e.g., computer code, program instructions, program code) stored on amachine readable medium/media. In some instances, the software isexecuted by the processor 1102. Further, realizations can include feweror additional components not illustrated in FIG. 11 (e.g., video cards,audio cards, additional network interfaces, peripheral devices, etc.).The processor 1102 and the memory 1104 are coupled to the bus 1108.Although illustrated as being coupled to the bus 1108, the memory 1104can be coupled to the processor 1102.

Advantageously, determination of the shape of the borehole ellipse asdescribe herein does not require any multi-variable optimizationprocess. Further, reasonable firing rates of calipers are needed alongwith a minimal number of calipers (e.g., 2) to determine the boreholeshape. The downhole tool may also freely rotate and move while inoperation as the apparent diameters are determined. The determination ofthe apparent diameters is also not based on any direction (e.g.,vertical, horizontal, or diagonal) of the borehole.

Further, the shape of the borehole can be used to facilitate drillingfor hydrocarbons. For example, selection of mud weight for lubricationof the drill bit and drilling direction may be adjusted and/ormaintained based on the shape of the borehole. As another example,computation of a volume of the borehole for purposes of cementing theborehole may be based on the shape of the borehole. Other variations arealso possible.

The flowcharts are provided to aid in understanding the illustrationsand are not to be used to limit scope of the claims. The flowchartsdepict example operations that can vary within the scope of the claims.Additional operations may be performed; fewer operations may beperformed; the operations may be performed in parallel; and theoperations may be performed in a different order. For example, theoperations depicted in blocks 402-410 and 702-708 can be performed inparallel or concurrently. It will be understood that each block of theflowchart illustrations and/or block diagrams, and combinations ofblocks in the flowchart illustrations and/or block diagrams, can beimplemented by program code. The program code may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable machine or apparatus.

As will be appreciated, aspects of the disclosure may be embodied as asystem, method or program code/instructions stored in one or moremachine-readable media. Accordingly, aspects may take the form ofhardware, software (including firmware, resident software, micro-code,etc.), or a combination of software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”The functionality presented as individual modules/units in the exampleillustrations can be organized differently in accordance with any one ofplatform (operating system and/or hardware), application ecosystem,interfaces, programmer preferences, programming language, administratorpreferences, etc.

Any combination of one or more machine readable medium(s) may beutilized. The machine readable medium may be a machine readable signalmedium or a machine readable storage medium. A machine readable storagemedium may be, for example, but not limited to, a system, apparatus, ordevice, that employs any one of or combination of electronic, magnetic,optical, electromagnetic, infrared, or semiconductor technology to storeprogram code. More specific examples (a non-exhaustive list) of themachine readable storage medium would include the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a portable compact disc read-only memory (CD-ROM), anoptical storage device, a magnetic storage device, or any suitablecombination of the foregoing. In the context of this document, a machinereadable storage medium may be any non-transitory tangible medium (e.g.,non-transitory machine readable media) that can contain, or store aprogram for use by or in connection with an instruction executionsystem, apparatus, or device. A machine readable storage medium is not amachine readable signal medium.

A machine readable signal medium may include a propagated data signalwith machine readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Amachine readable signal medium may be any machine readable medium thatis not a machine readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device. Program codeembodied on a machine readable medium may be transmitted using anyappropriate medium, including but not limited to wireless, wireline,optical fiber cable, RF, etc., or any suitable combination of theforegoing.

Computer program code for carrying out operations for aspects of thedisclosure may be written in any combination of one or more programminglanguages, including an object oriented programming language such as theJava® programming language, C++ or the like; a dynamic programminglanguage such as Python; a scripting language such as Perl programminglanguage or PowerShell script language; and conventional proceduralprogramming languages, such as the “C” programming language or similarprogramming languages. The program code may execute entirely on astand-alone machine, may execute in a distributed manner across multiplemachines, and may execute on one machine while providing results and oraccepting input on another machine.

The program code/instructions may also be stored in a machine readablemedium that can direct a machine to function in a particular manner,such that the instructions stored in the machine readable medium producean article of manufacture including instructions which implement thefunction/act specified in the flowchart and/or block diagram block orblocks.

While the aspects of the disclosure are described with reference tovarious implementations and exploitations, it will be understood thatthese aspects are illustrative and that the scope of the claims is notlimited to them. In general, techniques for formation properties aheadof a drill bit as described herein may be implemented with facilitiesconsistent with any hardware system or hardware systems. Manyvariations, modifications, additions, and improvements are possible.

Plural instances may be provided for components, operations orstructures described herein as a single instance. Finally, boundariesbetween various components, operations and data stores are somewhatarbitrary, and particular operations are illustrated in the context ofspecific illustrative configurations. Other allocations of functionalityare envisioned and may fall within the scope of the disclosure. Ingeneral, structures and functionality presented as separate componentsin the example configurations may be implemented as a combined structureor component. Similarly, structures and functionality presented as asingle component may be implemented as separate components. These andother variations, modifications, additions, and improvements may fallwithin the scope of the disclosure.

Use of the phrase “at least one of” preceding a list with theconjunction “and” should not be treated as an exclusive list and shouldnot be construed as a list of categories with one item from eachcategory, unless specifically stated otherwise. A clause that recites“at least one of A, B, and C” can be infringed with only one of thelisted items, multiple of the listed items, and one or more of the itemsin the list and another item not listed.

EXAMPLE EMBODIMENTS

Example embodiments include the following:

Embodiment 1

A method comprising: placing a downhole tool in a borehole of asubsurface formation, wherein the downhole tool comprises a plurality ofcalipers arranged around a circumference of the downhole tool; receivinga plurality of standoff measurements for different rotation angles ofthe downhole tool, wherein each standoff measurement is indicative of adistance between one of the plurality of calipers and a wall of theborehole; determining a plurality of apparent diameters of the boreholefor the different rotation angles of the downhole tool based on theplurality of standoff measurements and a radius of the downhole tool;determining a probability function based on the plurality of apparentdiameters; and identifying at least one of a semiminor axis, semimajoraxis, and ellipticity of the borehole based on the probability function.

Embodiment 2

The method of Embodiment 1, wherein the probability function is aprobability density function.

Embodiment 3

The method of Embodiment 1-2, wherein identifying at least one of asemiminor axis, semimajor axis, and ellipticity of the boreholecomprises determining a given apparent diameter associated with amaximum probability of the probability density function and a maximumapparent diameter indicated by the probability density function, whereinthe given apparent diameter is the semiminor axis of the borehole andthe maximum apparent diameter is the semimajor axis of the borehole.

Embodiment 4

The method of any of Embodiments 1-3, wherein the probability functionis a cumulative distribution function.

Embodiment 5

The method of any of Embodiments 1-4, wherein the cumulativedistribution function is an experimental cumulative distributionfunction; and wherein identifying at least one of a semiminor axis,semimajor axis, and ellipticity of the borehole based on the probabilityfunction comprises fitting a modeled cumulative distribution function tothe experimental cumulative distribution function, wherein parameters ofthe fitted modeled cumulative distribution function are indicative ofthe at least one of the semiminor axis, semimajor axis, and ellipticityof the borehole.

Embodiment 6

The method of any of Embodiments 1-5, wherein the fitting is based on anon-linear least squares inversion.

Embodiment 7

The method of any of Embodiments 1-6, wherein a number of the pluralityof standoff measurements is based on a following relationship:

$n_{min} \leq \frac{D \cdot R_{f} \cdot {rpm} \cdot N}{2 \cdot V_{DS}}$

where n_(min) is a minimal required total number of measurements, D is aspatial resolution over which the standoff measurements are performed,R_(f) is a firing rate of the calipers, rpm is revolutions per minutethat the downhole tool is spinning, N is a number of calipers on thedownhole tool, and V_(ds) is a drilling speed.

Embodiment 8

The method of any of Embodiments 1-7, further comprising drilling basedon the at least one of the semiminor axis, semimajor axis, andellipticity shape of the borehole.

Embodiment 9

One or more non-transitory machine-readable media comprising programcode executable by a processor, the program code to: receive, from aplurality of ultrasonic calipers of a downhole tool, a plurality ofstandoff measurements for different rotation angles of the downholetool, the downhole tool deployed in a borehole of a subsurfaceformation, wherein the plurality of calipers are arranged around acircumference of the downhole tool, wherein at least two of theplurality of calipers are diagonal from each other, and wherein eachstandoff measurement is indicative of a distance between one of theplurality of calipers and a wall of the borehole; determine a pluralityof apparent diameters of the borehole for the different rotation anglesof the downhole tool based on the plurality of standoff measurements anda radius of the downhole tool; determine a probability function based onthe plurality of apparent diameters; and identify at least one of asemiminor axis, semimajor axis, and ellipticity of the borehole based onthe probability function.

Embodiment 10

The one or more non-transitory machine-readable media of Embodiment 9,wherein the probability function is a probability density function.

Embodiment 11

The one or more non-transitory machine-readable media of Embodiment9-10, wherein the program code to identify at least one of a semiminoraxis, semimajor axis, and ellipticity of the borehole comprises programcode to determine a given apparent diameter associated with a maximumprobability of the probability density function and a maximum apparentdiameter indicated by the probability density function, wherein thegiven apparent diameter is the semiminor axis of the borehole and themaximum apparent diameter is the semimajor axis of the borehole.

Embodiment 12

The one or more non-transitory machine-readable media of any ofEmbodiments 9-11, wherein the probability function is a cumulativedistribution function.

Embodiment 13

The one or more non-transitory machine-readable media of any ofEmbodiments 9-12, wherein the cumulative distribution function is anexperimental cumulative distribution function; and wherein the programcode to identify at least one of a semiminor axis, semimajor axis, andellipticity of the borehole based on the probability function comprisesprogram code to fit a modeled cumulative distribution function to theexperimental cumulative distribution function, wherein parameters of thefitted modeled cumulative distribution function are indicative of the atleast one of the semiminor axis, semimajor axis, and ellipticity of theborehole.

Embodiment 14

The one or more non-transitory machine-readable media of any ofEmbodiments 9-13, wherein the fitting is based on a non-linear leastsquares inversion.

Embodiment 15

The one or more non-transitory machine-readable media of any ofEmbodiments 9-14, wherein the borehole is shaped as an ellipse.

Embodiment 16

A system comprising: a downhole tool deployed a borehole of a subsurfaceformation, wherein the downhole tool comprises a plurality of calipersarranged around a circumference of the downhole tool and wherein atleast two of the plurality of calipers are located diagonally acrossfrom each other; a processor; a non-transitory machine readable mediahaving program code executable by the processor to cause the processorto receive a plurality of standoff measurements for different rotationangles of the downhole tool, wherein each standoff measurement isindicative of a distance between one of the plurality of calipers and awall of the borehole; determine a plurality of apparent diameters of theborehole for the different rotation angles of the downhole tool based onthe plurality of standoff measurements and a radius of the downholetool; determine a probability function based on the plurality ofapparent diameters; and identify at least one of a semiminor axis,semimajor axis, and ellipticity of the borehole based on the probabilityfunction.

Embodiment 17

The system of Embodiment 16, wherein the probability function is aprobability density function.

Embodiment 18

The system of Embodiment 16 or 17, wherein the program code executableby the processor to cause the processor to identify at least one of asemiminor axis, semimajor axis, and ellipticity of the boreholecomprises program code to determine a given apparent diameter associatedwith a maximum probability of the probability density function and amaximum apparent diameter indicated by the probability density function,wherein the given apparent diameter is the semiminor axis of theborehole and the maximum apparent diameter is the semimajor axis of theborehole.

Embodiment 19

The system of any of Embodiments 16-18, wherein the probability functionis a cumulative distribution function.

Embodiment 20

The system of any of Embodiments 16-19, wherein the cumulativedistribution function is an experimental cumulative distributionfunction; and wherein the program code executable by the processor tocause the processor to identify at least one of a semiminor axis,semimajor axis, and ellipticity of the borehole based on the probabilityfunction comprises program code to fit a modeled cumulative distributionfunction to the experimental cumulative distribution function, whereinparameters of the modeled cumulative distribution function which fit theexperimental cumulative distribution function are indicative of the atleast one of the semiminor axis, semimajor axis, and ellipticity of theborehole.

1. A method comprising: positioning a downhole tool in a borehole formedin a subsurface formation, wherein the downhole tool comprises aplurality of calipers arranged around a circumference of the downholetool; detecting, using the plurality of calipers, a plurality ofstandoff measurements at different rotation angles; determining aplurality of apparent diameters of the borehole for the differentrotation angles of the downhole tool based on the plurality of standoffmeasurements and at least one of a radius and a diameter of the downholetool; determining a probability function based on the plurality ofapparent diameters; and determining a shape of the borehole based on theprobability function.
 2. The method of claim 1, wherein the probabilityfunction is a probability density function.
 3. The method of claim 2,wherein determining the shape of the borehole comprises identifying atleast one of a semiminor axis, a semimajor axis, and an ellipticity ofthe borehole.
 4. The method of claim 3, wherein identifying at least oneof the semiminor axis, the semimajor axis, and the ellipticity of theborehole comprises determining a given apparent diameter associated witha maximum probability of the probability density function and a maximumapparent diameter indicated by the probability density function, whereinthe given apparent diameter is the semiminor axis of the borehole andthe maximum apparent diameter is the semimajor axis of the borehole. 5.The method of claim 1, wherein the probability function is a cumulativedistribution function.
 6. The method of claim 1, further comprisingperforming or modifying a downhole operation based on the determinedshape of the borehole.
 7. The method of claim 6, wherein the downholeoperation comprises a drilling operation.
 8. A non-transitory,computer-readable medium having instructions stored thereon that areexecutable by a processor to perform operations comprising: detecting,using a plurality of calipers of a downhole tool to be positioned in aborehole formed in a subsurface formation, a plurality of standoffmeasurements at different rotation angles, wherein the plurality ofcalipers are arranged around a circumference of the downhole tool;determining a plurality of apparent diameters of the borehole for thedifferent rotation angles of the downhole tool based on the plurality ofstandoff measurements and at least one of a radius and a diameter of thedownhole tool; determining a probability function based on the pluralityof apparent diameters; and determining a shape of the borehole based onthe probability function.
 9. The non-transitory, computer-readablemedium of claim 8, wherein the probability function is a probabilitydensity function.
 10. The non-transitory, computer-readable medium ofclaim 9, wherein determining the shape of the borehole comprisesidentifying at least one of a semiminor axis, a semimajor axis, and anellipticity of the borehole.
 11. The non-transitory, computer-readablemedium of claim 10, wherein identifying at least one of the semiminoraxis, the semimajor axis, and the ellipticity of the borehole comprisesdetermining a given apparent diameter associated with a maximumprobability of the probability density function and a maximum apparentdiameter indicated by the probability density function, wherein thegiven apparent diameter is the semiminor axis of the borehole and themaximum apparent diameter is the semimajor axis of the borehole.
 12. Thenon-transitory, computer-readable medium of claim 8, wherein theprobability function is a cumulative distribution function.
 13. Thenon-transitory, computer-readable medium of claim 8, further comprisingperforming or modifying a downhole operation based on the determinedshape of the borehole.
 14. The non-transitory, computer-readable mediumof claim 13, wherein the downhole operation comprises a drillingoperation.
 15. A system comprising: a downhole tool to be deployed in aborehole formed a subsurface formation, wherein the downhole toolcomprises a plurality of calipers arranged around a circumference of thedownhole tool; a processor; and a computer-readable medium havinginstructions stored thereon that are executable by the processor tocause the processor to, detect, using the plurality of calipers, aplurality of standoff measurements at different rotation angles;determine a plurality of apparent diameters of the borehole for thedifferent rotation angles of the downhole tool based on the plurality ofstandoff measurements and at least one of a radius and a diameter of thedownhole tool; determine a probability function based on the pluralityof apparent diameters; and determine a shape of the borehole based onthe probability function.
 16. The system of claim 15, wherein theprobability function is a probability density function.
 17. The systemof claim 16, wherein the instructions executable by the processor tocause the processor to determine the shape of the borehole comprisesinstructions executable by the processor to cause the processor toidentify at least one of a semiminor axis, a semimajor axis, and anellipticity of the borehole.
 18. The system of claim 17, wherein theinstructions executable by the processor to cause the processor toidentify at least one of the semiminor axis, the semimajor axis, and theellipticity of the borehole comprises instructions executable by theprocessor to cause the processor to determine a given apparent diameterassociated with a maximum probability of the probability densityfunction and a maximum apparent diameter indicated by the probabilitydensity function, wherein the given apparent diameter is the semiminoraxis of the borehole and the maximum apparent diameter is the semimajoraxis of the borehole.
 19. The system of claim 15, wherein theprobability function is a cumulative distribution function.
 20. Thesystem of claim 15, wherein the instructions comprise instructionsexecutable by the processor to cause the processor to perform or modifya downhole operation based on the determined shape of the borehole.